// --------------------------------------------------------------------------------------------------------------------
// <copyright file="PassThroughAuthenticationService.cs" company="AzureContrib (Open source library http://azurecontrib.codeplex.com)">
//   Microsoft Public License (Ms-PL)
// </copyright>
// <summary>
//   An <see cref="IAuthenticationService" /> that does nothing with the incoming <see cref="IClaimsPrincipal" />
// </summary>
// --------------------------------------------------------------------------------------------------------------------

using Microsoft.IdentityModel.Claims;

namespace AzureContrib.WindowsAzure.AccessControlService
{
	/// <summary>
	/// An <see cref="IAuthenticationService"/> that does nothing with the incoming <see cref="IClaimsPrincipal"/>
	/// </summary>
	internal class PassThroughAuthenticationService : IAuthenticationService
	{
		/// <summary>
		/// Will authenticate users coming in to the service
		/// </summary>
		/// <param name="resourceName">The name of the resource to authenticate access to.</param>
		/// <param name="incomingPrincipal">The principal of the user to be authenticated.</param>
		/// <returns>The <paramref name="incomingPrincipal"/>.</returns>
		public IClaimsPrincipal Authenticate(string resourceName, IClaimsPrincipal incomingPrincipal)
		{
			return incomingPrincipal;
		}
	}
}